home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
United Public Domain Gold 2
/
United Public Domain Gold 2.iso
/
utilities
/
pu623.dms
/
pu623.adf
/
BigBrother
/
bigbrother.asm.pp
/
bigbrother.asm
Wrap
Assembly Source File
|
1992-09-02
|
56KB
|
3,138 lines
;========================================================================
;= Big Brother V3.12 by Orega Holland (c)1992 =
;= Programmer: EA van Breemen =
;= Assembler : DevPac 2.14 =
;= All copyrights are reserved by Orega Holland. =
;= No part of this program may be used for other commercial programs =
;= without the prior written permission of the author. The author =
;= cannot be held responsible for behaviour of this program due to =
;= the use of this program. BigBrother is SHAREWARE. This means it =
;= can be copied for non-commercial use and it may not be copied as =
;= a part of a commercial package. =
;========================================================================
;========================================================================
;= Modifications: =
;= 24-1-90: fixed ctrl-Help bug =
;= added newcli =
;= optimized coding =
;= 26-1-90: added newcli gadget =
;= modified tekstborder =
;= fixed 'system has been modified' tekst bug =
;= 27-1-90: fixed AlertWarning =
;= adjusted some windowsizes =
;= intuified viewbootblocktekst =
;= regulated bootio errors =
;= added help =
;= added preferences =
;= 21-10-90 fixed the memory clean message update bug =
;= added script options =
;= 23-10-90 make auto detaching =
;= 24-10-90 fixed another clean message box bug =
;= added ReBoot routine =
;= 25-10-90 BigBrother is now using the official reboot =
;= 27-10-90 Fixed the endcli bug =
;= 01-12-90 Fixed multiple selection bug. BB replies to all =
;= messages first before next Wait =
;= Version 2.11 Final release. =
;= 16-10-91 Version 3.00 =
;= 23-10-91 Version 3.01 =
;= Gadgets 2.0 look =
;= 24-10-91 All Arp stuff removed! (everyone may make mistakes) = =
;= Nocare patch installed. =
;= Mouse accelerator added. =
;= V3.02 =
;= 04-11-91 V3.05 Now using Signals for faster response =
;= Added check.task =
;= 05-11-91 Preferences installed =
;= Function macros can be disabled (for WP etc.) =
;= Code optimized (pc-rel) =
;= V3.07 =
;= 07-11-91 Beta release of BigBrother. V3.09 =
;= 07-12-91 Kickstart 2.0 RomBase bug removed =
;= 2.0 Font bug removed. V3.11 = =
;= 01-02-92 Fixed big_prefs update bug =
;= added version string =
;========================================================================
XLIB macro
xref _LVO\1
endm
MEMORY equ $1
VIEW equ $2
CLEAR equ $3
INSTALL equ $4
DRIVE equ $5
WATCH equ $6
NEWSHELL equ $7
PREFS equ $8
REBOOT equ $9
NOCARE equ $a
MOUSEACC equ $b
FUNCTIONKEYS equ $c
SAVE equ $d
USE equ $e
CANCEL equ $f
READ equ $2
WRITE equ $3
DIE equ 0
STAY equ 1
IECLASS_RAWKEY equ $01
IECLASS_RAWMOUSE equ $02
ie_X equ $A
ie_Y equ $C
IEQUALIFIER_CONTROL equ $08
HELP_KEY equ $5f
FUNC_F1 equ $50
FUNC_F2 equ $51
FUNC_F3 equ $52
FUNC_F4 equ $53
FUNC_F5 equ $54
FUNC_F6 equ $55
FUNC_F7 equ $56
FUNC_F8 equ $57
FUNC_F9 equ $58
FUNC_F10 equ $59
IND_ADDHANDLER equ $09
IND_REMHANDLER equ $a
NT_MESSAGE equ $05
NT_MSGPORT equ $04
NT_TASK equ $01
PA_SIGNAL equ $00
TC_SIZE equ $5C
TC_SPLOWER equ $3A
TC_SPREG equ $36
TC_SPUPPER equ $3E
MEMF_CHIP equ $2
MEMF_CLEAR equ $10000
MEMF_PUBLIC equ $1
io_Message equ $00
io_Data equ $28
io_Command equ $1c
Ln_Type equ $08
Ln_Name equ $0a
Ln_Pri equ $09
mp_Size equ $22
mp_Node equ $00
mp_SigBit equ $0f
mp_Flags equ $0e
mp_SigTask equ $10
mn_Node equ $00
mn_Length equ $12
mn_ReplyPort equ $0e
gg_GadgetID equ $26
im_Class equ $14
im_Code equ $18
im_Address equ $1c
GadgetID equ $26
wd_UserPort equ $56
wd_RPort equ $32
WindowPtr equ $b8
nw_Flags equ $0e
nw_Type equ $2e
is_Code equ $12
is_Data equ $0e
is_Node equ $00
GADGETUP equ $40
GADGHNONE equ $03
GADGHIMAGE equ $02
GADGHCOMP equ 0
SELECTED equ $80
CLOSEWINDOW equ $200
RAWKEY equ $400
WINDOWDRAG equ $02
WINDOWDEPTH equ $04
WINDOWCLOSE equ $08
ACTIVATE equ $1000
NOCAREREFRESH equ $20000
RELVERIFY equ $01
BOOLGADGET equ $01
TOGGLESELECT equ $100
RP_JAM1 equ $00
RP_JAM2 equ $01
TOPAZ_EIGHTY equ $8
TD_CHANGESTATE equ 14
NULL equ $00
NOCARE_PATCH equ $01
MOUSE_PATCH equ $02
FUNCTION_PATCH equ $04
REFRESHBIT0 equ $06
WBENCHSCREEN equ $01
ROM_BASE equ $f80000 ; Start of Kickstart 2.0
MAGIC_ROMEND EQU $01000000 ;End of Kickstart ROM
MAGIC_SIZEOFFSET EQU -$14 ;Offset from end of ROM to Kickstart size
V36_EXEC EQU 36 ;Exec with the ColdReboot() function
TEMP_ColdReboot EQU -726 ;Offset of the V36 ColdReboot function
LIB_VERSION EQU $14
XLIB OpenLibrary
XLIB CloseLibrary
XLIB OpenDevice
XLIB CloseDevice
XLIB OpenWindow
XLIB CloseWindow
XLIB CreateProc
XLIB UnLoadSeg
XLIB AddTask
XLIB Permit
XLIB Forbid
XLIB DoIO
XLIB Delay
XLIB GetMsg
XLIB ReplyMsg
XLIB AllocSignal
XLIB FreeSignal
XLIB Signal
XLIB FindTask
XLIB AddPort
XLIB RemPort
XLIB FindName
XLIB DeviceProc
XLIB RefreshGadgets
XLIB Wait
XLIB Move
XLIB Text
XLIB SetAPen
XLIB AllocMem
XLIB FreeMem
XLIB SetWindowTitles
XLIB FindResident
XLIB RemTask
XLIB DisplayBeep
XLIB Disable
XLIB Enable
XLIB DrawBorder
XLIB PrintIText
XLIB WBenchToFront
XLIB DisplayAlert
XLIB SizeWindow
XLIB WaitPort
XLIB Open
XLIB Close
XLIB Read
XLIB Lock
XLIB UnLock
XLIB Execute
XLIB WaitPort
XLIB Supervisor
XLIB Write
XLIB Output
XLIB SetFunction
STACK_SIZE equ 4096
;===================================
;= Startup code for auto detaching =
;= BigBrother V2.11 =
;===================================
section "Startup",code
start bra.s 1$
dc.b '$VER: BigBrother V3.12 (1-2-1992)',$a,$d,0
even
1$ move.l ($4).L,a6
sub.l a1,a1
jsr _LVOFindTask(a6)
move.l d0,a4
tst.l $ac(a4) ; Are we from the WBench ????
bne.s from_cli
lea.l $5c(a4),a0
jsr _LVOWaitPort(a6)
jsr _LVOGetMsg(a6) ; Get message
from_cli:
move.l ($4).L,a6
lea.l DosName,a1
clr.l d0
jsr _LVOOpenLibrary(a6)
move.l d0,a5
beq uit
move.l #BIG_NAME,a1
jsr _LVOFindTask(a6)
tst.l d0
bne already_active
move.l a5,a6
jsr _LVOOutput(a6)
move.l d0,d1
move.l #Title,d2
move.l #Title_Size,d3
jsr _LVOWrite(a6)
move.l #NIL_NAME,d1
move.l #1006,d2
jsr _LVOOpen(a6)
move.l d0,pcb_Input
move.l d0,pcb_Output
move.l #mymain,d3
sub.l #4,d3
lsr.l #2,d3 ; make BPTR !!!!!!
move.l #BIG_NAME,d1
move.l #2,d2 ; pri 2
move.l #4096,d4
jsr _LVOCreateProc(a5)
lea.l start(pc),a0
move.l #0,-4(a0) ; Erase pointer to next segment
bra.s cc1
already_active:
move.l a5,a6
jsr _LVOOutput(a6)
move.l d0,d1
move.l #Active_Title,d2
move.l #Active_Size,d3
jsr _LVOWrite(a6)
cc1 move.l a5,a1
move.l ($4).L,a6
jsr _LVOCloseLibrary(a6)
uit rts
;======================================
;= The Message Create Port function =
;= a0 contains pointer to name =
;= d0 contains priority =
;= on exit: =
;= d0 contains pointer to messageport =
;= or 0 if failed =
;= All registers are affected =
;======================================
CreatePort:
move.l a0,a5
move.l d0,d6
bsr.s GetSignal
cmp.l #-1,d0
bne.s cr_1
create_out:
moveq #0,d0
rts
cr_1 move.l d0,d4
move.l #mp_Size,d0
move.l #MEMF_CLEAR|MEMF_PUBLIC,d1
jsr _LVOAllocMem(a6)
move.l d0,d5
bne.s 2$
move.l d4,d0
jsr _LVOFreeSignal(a6)
bra.s create_out
2$ move.l d5,a0
move.b d4,mp_SigBit(a0)
move.b d6,mp_Node+Ln_Pri(a0)
move.b #NT_MSGPORT,mp_Node+Ln_Type(a0)
move.l a5,mp_Node+Ln_Name(a0)
move.b #PA_SIGNAL,mp_Flags(a0)
sub.l a1,a1
jsr _LVOFindTask(a6)
move.l d0,mp_SigTask(a0)
move.l a0,a1
jsr _LVOAddPort(a6)
move.l d5,d0
rts
;=================================
;= Get a signal for current task =
;= Assumes it will succeed. =
;= mask will be in d1 =
;=================================
GetSignal:
move.l $4,a6
moveq #-1,d0
jsr _LVOAllocSignal(a6)
moveq #1,d1
lsl.l d0,d1
rts
;========================================
;= Section containing the resident code =
;========================================
Section "Main",code
;=======================================
;= Initialisation code for Big Brother =
;=======================================
mymain move.l ($4).L,a6
lea.l DosName(pc),a1
clr.l d0
jsr _LVOOpenLibrary(a6)
move.l d0,DOSBase
beq nodos
bsr loadprefs
move.l ($4).L,a6
clr.l d0
lea.l IntuitionName(pc),a1
jsr _LVOOpenLibrary(a6)
move.l d0,IntuitionBase
beq nointuition
clr.l d0
lea.l GraphicsName(pc),a1
jsr _LVOOpenLibrary(a6)
move.l d0,GfxBase
beq nographics
bsr initall ; Open inputdevice etc.
bra check ; Jump to checkroutine
;==================================
;= loadprefs: tries to load prefs =
;==================================
loadprefs:
move.l DOSBase(pc),a6
move.l #prefs_file,d1
move.l #-2,d2
jsr _LVOLock(a6)
move.l d0,lock
beq no_prefs
move.l #prefs_file,d1
move.l #1005,d2
jsr _LVOOpen(a6)
move.l d0,filehandle
move.l d0,d1
move.l #DoIOVector,d2
moveq #9,d3
jsr _LVORead(a6)
move.l d0,d5
move.l filehandle,d1
jsr _LVOClose(a6)
move.l lock,d1
jsr _LVOUnLock(a6)
cmp.l #9,d5
bne.s no_prefs ; Read Error has occured !
bsr reflect ; Update gadget flags
rts
no_prefs:
bsr Saddam
move.b #MOUSE_PATCH|FUNCTION_PATCH|NOCARE_PATCH,patchstatus
save_prefs:
move.l DOSBase(pc),a6
move.l #prefs_file,d1
move.l #1006,d2
jsr _LVOOpen(a6)
move.l d0,filehandle
move.l d0,d1
move.l #DoIOVector,d2
moveq #9,d3
jsr _LVOWrite(a6)
move.l filehandle,d1
jsr _LVOClose(a6)
rts
;=============================================
;= Routine to install a input device handler =
;=============================================
initall: ; Open inputdevice
move.b #0,signal
move.l #0,oldopenwindow
move.b #0,drive ; df0: is default
move.b #STAY,status
bsr nocare ; install nocare patch
lea.l MyPortName(pc),a0
moveq #0,d0
jsr CreatePort
move.l d0,InputDevPort
sub.l a1,a1
jsr _LVOFindTask(a6)
move.l d0,a3
move.l d0,bigtask ; Store big task
move.l #-1,WindowPtr(a3) ; I don't want requesters
lea.l InputRequestBlock(pc),a0
move.b #NT_MESSAGE,io_Message+mn_Node+Ln_Type(a0)
move.w #$30,io_Message+mn_Length(a0)
move.l InputDevPort(pc),io_Message+mn_ReplyPort(a0)
lea.l HandlerStuff(pc),a1
move.l #myhandler,is_Code(a1)
move.b #127,is_Node+Ln_Pri(a1)
move.l #0,is_Data(a1)
lea.l InputRequestBlock(pc),a1
lea.l InputDeviceName(pc),a0
clr.l d0
clr.l d1
jsr _LVOOpenDevice(a6)
lea.l InputRequestBlock(pc),a0
move.w #IND_ADDHANDLER,io_Command(a0)
move.l #HandlerStuff,io_Data(a0)
move.l a0,a1
jsr _LVODoIO(a6) ; Install handler
jsr GetSignal ; Allocate Signal for activation
move.l d1,virusmask
jsr GetSignal ; Allocate Signal for activation
move.l d1,keymask
move.l #TC_SIZE,d0
move.l #MEMF_CLEAR|MEMF_PUBLIC,d1
jsr _LVOAllocMem(a6)
move.l d0,checktask
move.l d0,a0
lea.l stack(pc),a1
move.l a1,TC_SPLOWER(a0)
move.l a1,d1
add.l #1024,d1
move.l d1,TC_SPUPPER(a0)
move.l d1,TC_SPREG(a0)
move.b #NT_TASK,Ln_Type(a0)
move.b #-1,Ln_Pri(a0)
move.l #CHECK_NAME,Ln_Name(a0)
move.l a0,a1
move.l #NewCheck,a2
move.l #0,a3
jsr _LVOAddTask(a6)
rts
;================================
;= Code for Nocare window patch =
;================================
nocare:
move.l oldopenwindow,d0
bne 1$ ; Patch already installed
move.l ($4).L,a6
move.l IntuitionBase(pc),a1
move.w #_LVOOpenWindow,a0
lea.l newopenwindow(pc),a2
move.l a2,d0
jsr _LVOSetFunction(a6)
move.l d0,oldopenwindow
1$ rts
nocare_off: ; Disable
move.l ($4).L,a6
move.l IntuitionBase(pc),a1
move.w #_LVOOpenWindow,a0
move.l oldopenwindow,d0
beq 1$ ; not yet installed
jsr _LVOSetFunction(a6)
move.l #0,oldopenwindow
1$ rts
;=======================
;= Actual Nocare patch =
;=======================
newopenwindow:
cmp.w #WBENCHSCREEN,nw_Type(a0)
bne.s dontchange
move.l nw_Flags(a0),d0
bclr #REFRESHBIT0,d0
move.l d0,nw_Flags(a0)
dontchange:
move.l oldopenwindow(pc),a1
jmp (a1) ; Jump to original code.
;=======================
;= Code for Check Task =
;=======================
NewCheck:
bsr.s chlus ; Check routine
cmp.b #DIE,status
beq.s killme
bra.s NewCheck
killme move.l #0,a1
move.l $4,a6
jsr _LVORemTask(a6)
rts ; Should never get here...
chlus move.l ($4).L,a0
move.l a0,a6
clr.l d2
tst.l 42(a0)
beq.s 1$
ori.l #1,d2
1$ tst.l 46(a0)
beq.s 2$
ori.l #1,d2
2$ tst.l 546(a0)
beq.s 3$
ori.l #2,d2
3$ tst.l 550(a0)
beq.s 4$
ori.l #2,d2
4$ lea.l 350(a0),a0
lea.l devicename(pc),a1
move.l ($4).L,a6
jsr _LVOFindName(a6)
move.l d0,a0
move.l -28(a0),d1
cmp.l #ROM_BASE,d1
bhs.s 5$
ori.l #8,d2
5$ move.l ($4).L,a0
move.l -454(a0),d1
cmp.l DoIOVector,d1
beq.s 6$
ori.l #4,d2
6$ lea.l TaskName(pc),a1
jsr _LVOFindTask(a6)
tst.l d0
beq.s 7$
ori.l #16,d2
7$ andi.l #31,d2
move.l d2,memorymask
moveq #0,d0
lea.l expert(pc),a0
move.b 0(a0,d2),d0
cmp.b #0,d0
beq.s novirus
cmp.b #2,d0
beq.s novirus
move.b d0,signal
move.l ($4).L,a6
move.l virusmask,d0
move.l bigtask,a1
jsr _LVOSignal(a6) ; Signal Big Brother
novirus
rts
;======================================================
;= The Input Device Handler for checking the Help Key =
;======================================================
myhandler ; The input_handler
cmp.b #IECLASS_RAWMOUSE,4(a0)
bsr mouseacc
cmp.b #IECLASS_RAWKEY,4(a0)
beq.s akey
noop move.l a0,d0 ; Return head of list
rts
akey move.w 8(a0),d0
and.w #IEQUALIFIER_CONTROL,d0 ; Mask Control bit
beq.s noop ; None of my keys
cmp.w #HELP_KEY,6(a0)
bne.s 1$ ; Check next key
move.w #HELP_KEY,keyfound
bra needed
1$ btst #2,patchstatus(pc)
beq.s noop ; Function keys are disabled
cmp.w #FUNC_F1,6(a0)
bne.s 2$
move.w #FUNC_F1,keyfound
bra needed
2$ cmp.w #FUNC_F2,6(a0)
bne.s 3$
move.w #FUNC_F2,keyfound
bra needed
3$ cmp.w #FUNC_F3,6(a0)
bne.s 4$
move.w #FUNC_F3,keyfound
bra needed
4$ cmp.w #FUNC_F4,6(a0)
bne.s 5$
move.w #FUNC_F4,keyfound
bra needed
5$ cmp.w #FUNC_F5,6(a0)
bne.s 6$
move.w #FUNC_F5,keyfound
bra needed
6$ cmp.w #FUNC_F6,6(a0)
bne.s 7$
move.w #FUNC_F6,keyfound
bra needed
7$ cmp.w #FUNC_F7,6(a0)
bne.s 8$
move.w #FUNC_F7,keyfound
bra needed
8$ cmp.w #FUNC_F8,6(a0)
bne.s 9$
move.w #FUNC_F8,keyfound
bra needed
9$ cmp.w #FUNC_F9,6(a0)
bne.s 10$
move.w #FUNC_F9,keyfound
bra needed
10$ cmp.w #FUNC_F10,6(a0)
bne noop
move.w #FUNC_F10,keyfound
needed movem.l d0-d6/a0-a6,-(sp)
move.l ($4).L,a6
move.l keymask,d0
move.l bigtask,a1
jsr _LVOSignal(a6) ; Signal Big Brother
movem.l (sp)+,d0-d6/a0-a6
move.l (a0),a0
cmp.l #0,a0
beq.s out
bra myhandler ; Process more events !
out clr.l d0 ; End of chain
rts
;==============================
;= A simple mouse accelerator =
;==============================
mouseacc:
btst.b #1,patchstatus(pc)
bne.s 3$
rts
3$ cmp.w #1,acc
bne.s 1$
rts
1$ movem.l d2-d6,-(a7)
move.w acc,d3
move.w #1,d2
move.w ie_X(a0),d1
bpl.s 2$
neg.w d1
move.w #-1,d2
2$ cmp.w #0,d1
bls sk1
sub.w #1,d1
mulu.w d3,d1
add.w #1,d1
mulu.w d2,d1
move.w d1,ie_X(a0)
sk1 move.w #1,d2
move.w ie_Y(a0),d1
bpl.s 3$
neg.w d1
move.w #-1,d2
3$ cmp.w #0,d1
bls sk2
sub.w #1,d1
mulu.w d3,d1
add.w #1,d1
mulu.w d2,d1
move.w d1,ie_Y(a0)
sk2 movem.l (a7)+,d2-d6
rts
;====================================
;= Code for checking the Amiga =
;====================================
check move.l ($4).L,a6
move.l virusmask,d0
or.l keymask,d0
jsr _LVOWait(a6) ; Wait for signal
move.l d0,d1
and.l virusmask,d0
beq.s no_virus_signal
clr.l d0 ; must be a virus
move.b signal,d0
beq.s check
cmp.b #2,d0
beq.s check
bra.s activate ; Open window etc., a virus !!!
no_virus_signal:
move.w keyfound(pc),d0
cmp.w #FUNC_F1,d0
bne.s 1$
bsr newcli
1$ cmp.w #HELP_KEY,d0
beq.s activate
bsr do_function_keys
bra.s check
;=========================================================
;= Routine for the window processing in case of an event =
;=========================================================
activate
move.l IntuitionBase(pc),a6
jsr _LVOWBenchToFront(a6)
move.l #NewWindowStructure1,a0
jsr _LVOOpenWindow(a6)
move.l d0,window
move.l d0,a0
move.l wd_RPort(a0),rp
move.l rp,a0
move.l #Border2,a1
moveq #0,d0
moveq #0,d1
jsr _LVODrawBorder(a6)
bsr printstatus
waitloop:
move.l window(pc),a0
move.l wd_UserPort(a0),a0
move.l a0,userport
moveq #0,d1
move.b mp_SigBit(a0),d1
moveq #1,d0
asl.l d1,d0
move.l ($4).L,a6
jsr _LVOWait(a6) ; Wait for an event
look move.l ($4).L,a6
move.l userport,a0 ; Get UserPort
jsr _LVOGetMsg(a6) ; Get Message from IDCMP Port
tst.l d0
beq waitloop ; No more messages left
move.l d0,a1
move.l im_Class(a1),d4
move.w im_Code(a1),d5
move.l im_Address(a1),a2
jsr _LVOReplyMsg(a6) ; Reply the message
cmp.l #RAWKEY,d4
bne.s 1$
cmp.w #HELP_KEY,d5
bne.s 1$
bsr showhelp
bra look
1$ cmp.l #CLOSEWINDOW,d4
beq.s closealldown
cmp.l #GADGETUP,d4
bne.s look
bsr.s process_gadgets ; Someone has pressed a gadget
cmp.w #WATCH,d0
bne.s look
watchmode:
move.l IntuitionBase(pc),a6
move.l window(pc),a0
jsr _LVOCloseWindow(a6)
move.b #0,signal
bra check
closealldown:
bsr yesno3 ; Want to quit???
tst.l d0
beq look ; no way
move.l IntuitionBase(pc),a6
move.l window(pc),a0
jsr _LVOCloseWindow(a6)
move.b #0,signal
jmp exit
Saddam move.l ($4).L,a6
move.l -454(a6),DoIOVector
lea.l 350(a6),a0
lea.l devicename(pc),a1
move.l ($4).L,a6
jsr _LVOFindName(a6)
move.l d0,a0
move.l -28(a0),TrackDiskIO
rts
;==================================
;= Routine for processing Gadgets =
;==================================
process_gadgets:
move.w gg_GadgetID(a2),d0
cmp.w #WATCH,d0
bne.s 1$
rts
1$ cmp.w #DRIVE,d0
beq.s nextdrive
cmp.w #CLEAR,d0
beq clearmemory
cmp.w #VIEW,d0
beq viewbootblock
cmp.w #INSTALL,d0
beq installdisk
cmp.w #MEMORY,d0
beq viewmemory
cmp.w #NEWSHELL,d0
beq newcli
cmp.w #PREFS,d0
beq preferences
cmp.w #REBOOT,d0
beq reboot
clr.l d0 ; Clear d0 if GadgetID <> WATCH
rts
;==============================
;= Finds next available drive =
;==============================
nextdrive:
move.b drive,d0
addq #1,d0
cmp.b #4,d0 ; drive number too high ???
bne.s 1$
moveq #0,d0 ; just select df0:
1$ cmp.b #0,d0
bne.s 2$
move.l df0,ITextText1
2$ cmp.b #1,d0
bne.s 3$
move.l df1,ITextText1
3$ cmp.b #2,d0
bne.s 4$
move.l df2,ITextText1
4$ cmp.b #3,d0
bne.s 5$
move.l df3,ITextText1
5$ move.b d0,drive
move.l #ITextText1,d1
move.l DOSBase(pc),a6
jsr _LVODeviceProc(a6) ; Does drive exists ?
tst.l d0
bne.s 6$ ; Yeah
bra.s nextdrive ; Try next drive
6$ move.l #Gadget1,a0
move.l window(pc),a1
move.l #0,a2
move.l IntuitionBase(pc),a6
jsr _LVORefreshGadgets(a6)
clr.l d0
rts
;================================
;= Clears memory area from viri =
;================================
clearmemory:
bsr yesno ; Are you sure????
tst.l d0
beq clearexit ; Noop
move.l ($4).L,a6
jsr _LVODisable(a6)
lea.l TaskName(pc),a1
jsr _LVOFindTask(a6)
tst.l d0
beq.s 1$ ; No rad
move.l d0,a1
jsr _LVORemTask(a6) ; Kill it!!!
1$ move.l ($4).L,a6
clr.l 42(a6)
clr.l 46(a6)
clr.l 546(a6)
clr.l 550(a6)
clr.l 554(a6)
cmp.l #0,TrackDiskIO
beq 2$
lea.l 350(a6),a0
lea.l devicename(pc),a1
move.l ($4).L,a6
jsr _LVOFindName(a6)
move.l d0,a0
move.l TrackDiskIO(pc),-28(a0) ; Restore TrackDiskIO
2$ move.l DoIOVector(pc),-454(a6)
clr.l d1
lea.l 34(a6),a0
move.w #$16,d0
loop add.w (a0)+,d1
dbf d0,loop
not.w d1
move.w d1,82(a6)
jsr _LVOEnable(a6)
move.l IntuitionBase(pc),a6
move.l #0,a0
jsr _LVODisplayBeep(a6)
move.l ($4).L,a6
move.b #0,signal
bsr chlus ; Check memory
bsr printstatus ; Show current memory status
clearexit:
clr.l d0 ; No WATCH Gadget
rts
;====================================
;= Are you sure to clear memory???? =
;====================================
yesno:
move.l IntuitionBase(pc),a6
moveq #0,d0
lea.l Alertstring(pc),a0
move.l #50,d1
jsr _LVODisplayAlert(a6)
rts
;====================================
;= Are you sure to reboot???? =
;====================================
yesno2:
move.l IntuitionBase(pc),a6
moveq #0,d0
lea.l Alertstring2(pc),a0
move.l #50,d1
jsr _LVODisplayAlert(a6)
rts
;====================================
;= Are you sure you want to quit??? =
;====================================
yesno3:
move.l IntuitionBase(pc),a6
moveq #0,d0
lea.l Alertstring3(pc),a0
move.l #50,d1
jsr _LVODisplayAlert(a6)
rts
;==================================================
;= Routine shows a bootblock in ascii in a window =
;==================================================
viewbootblock:
move.w #534,hsize ; Adjust windowwidth
move.w #150,hsize+2 ; Adjust height
lea.l InitTitle(pc),a0
move.l a0,title2
move.l IntuitionBase(pc),a6
lea.l NewWindowStructure2(pc),a0
jsr _LVOOpenWindow(a6)
move.l d0,window2
move.l d0,a0
move.l wd_RPort(a0),rp2
move.l ($4).L,a6
move.l #1024,d0
moveq #2,d1 ; Chip memory needed
jsr _LVOAllocMem(a6) ; Allocate buffer for bootblock
move.l d0,buffer
bsr readbootblock
move.b io_error,d0
cmp.b #29,d0
bne 1$ ; Disk is available
move.l window2(pc),a0
move.l #-234,d0
move.l #-100,d1
move.l IntuitionBase(pc),a6
jsr _LVOSizeWindow(a6) ; Make window smaller
move.l #disk_changed,Mt5
move.l #disk_changed,Mt6
move.l rp2,a0
clr.l d0
clr.l d1
lea.l MyTekst5(pc),a1
jsr _LVOPrintIText(a6) ; No disk !
bra 2$ ; skip printbuffer
1$ bsr printbuffer
2$ move.l buffer(pc),a1
move.l #1024,d0
move.l ($4).L,a6
jsr _LVOFreeMem(a6) ; Free buffer for bootblock
move.l window2(pc),a0
bsr waitforclose ; Wait for closegadget
move.l IntuitionBase(pc),a6
move.l window2(pc),a0
jsr _LVOCloseWindow(a6)
clr.l d0 ; No WATCH Gadget
rts
;====================================
;= Routine for installing your disk =
;====================================
installdisk:
move.w #300,hsize
move.w #50,hsize+2 ; Adjust height
lea.l InstallTitle(pc),a0
move.l a0,title2
move.l IntuitionBase(pc),a6
lea.l NewWindowStructure2(pc),a0
jsr _LVOOpenWindow(a6)
move.l d0,window2
move.l d0,a0
move.l wd_RPort(a0),rp2
move.l ($4).L,a6
move.l #1024,d0
move.l #2+1<<16,d1 ; Cleared Chip memory needed
jsr _LVOAllocMem(a6) ; Allocate buffer for bootblock
move.l d0,buffer
beq skip_install ; Prevent a guru
lea.l bootcode(pc),a0
move.l d0,a1
move.l #bootendcode-bootcode-1,d1
1$ move.b (a0)+,(a1)+ ; Copy bootblock into buffer
dbra d1,1$
lea.l StandardBootBlock(pc),a0
move.l #Standardend-StandardBootBlock-1,d1
2$ move.b (a0)+,(a1)+
dbra d1,2$
bsr sum
bsr writebuffer
move.l buffer(pc),a1
move.l #1024,d0
move.l ($4).L,a6
jsr _LVOFreeMem(a6) ; Free buffer for bootblock
tst.b io_error
bne.s 3$ ; An error has occured
move.l #install_message,Mt5
move.l #install_message,Mt6
bra.s install_m
3$ move.b io_error,d0
cmp.b #28,d0 ; disk protected???
bne.s 4$
move.l #disk_protected,Mt5
move.l #disk_protected,Mt6
bra install_m
4$ cmp.b #29,d0 ; disk changed ????
bne 5$
move.l #disk_changed,Mt5
move.l #disk_changed,Mt6
bra.s install_m
5$ move.l #install_fail,Mt5 ; Unknown failure
move.l #install_fail,Mt6
install_m
move.l rp2(pc),a0
clr.l d0
clr.l d1
lea.l MyTekst5(pc),a1
move.l IntuitionBase(pc),a6
jsr _LVOPrintIText(a6)
move.l window2(pc),a0
bsr waitforclose ; Wait for closegadget
skip_install:
move.l IntuitionBase(pc),a6
move.l window2(pc),a0
jsr _LVOCloseWindow(a6)
clr.l d0 ; No WATCH Gadget
rts
;=============================================
;= Routine for displaying a part of ExecBase =
;=============================================
viewmemory:
move.w #318,hsize
move.w #100,hsize+2 ; Adjust height
lea.l ViewTitle(pc),a0
move.l a0,title2
move.l IntuitionBase(pc),a6
lea.l NewWindowStructure2(pc),a0
jsr _LVOOpenWindow(a6)
move.l d0,window2
move.l d0,a0
move.l wd_RPort(a0),rp2
move.l ($4).L,a6
move.l #5*80,d0
move.l #1<<16,d1
jsr _LVOAllocMem(a6) ; Allocate buffer
move.l d0,buffer
move.l d0,-(a7)
move.l d0,MTE8
move.l d0,MTE8b
add.l #80,d0
move.l d0,MTE9
move.l d0,MTE9b
add.l #80,d0
move.l d0,MTE10
move.l d0,MTE10b
add.l #80,d0
move.l d0,MTE11
move.l d0,MTE11b
add.l #80,d0
move.l d0,MTE12
move.l d0,MTE12b
;======== ColdCapture ==============
lea.l coldcapture(pc),a0
move.l buffer(pc),a1
bsr stringcopy
move.l ($4).L,a6
move.l 42(a6),a0
bsr makestring
;======= CoolCapture =============
add.l #80,buffer
lea.l coolcapture(pc),a0
move.l buffer(pc),a1
bsr stringcopy
move.l ($4).L,a6
move.l 46(a6),a0
bsr makestring
;======== KickMemPtr ===============
add.l #80,buffer
lea.l kickmemptr(pc),a0
move.l buffer(pc),a1
bsr stringcopy
move.l ($4).L,a6
move.l 546(a6),a0
bsr makestring
;========== KickTagPtr ================
add.l #80,buffer
lea.l kicktagptr(pc),a0
move.l buffer(pc),a1
bsr stringcopy
move.l ($4).L,a6
move.l 550(a6),a0
bsr makestring
;==== DoIO =========================
add.l #80,buffer
lea.l doio_vector(pc),a0
move.l buffer(pc),a1
bsr stringcopy
move.l ($4).L,a6
move.l -454(a6),a0
bsr makestring
;===== Rad ============================
move.l ($4).L,a6
lea.l TaskName(pc),a1
jsr _LVOFindTask(a6)
tst.l d0
beq.s no_rad ; No rad
move.l #found_rad,MTE13
move.l #found_rad,MTE13b
bra.s rad_cont
no_rad move.l #no_found_rad,MTE13
move.l #no_found_rad,MTE13b
rad_cont:
move.l rp2,a0
clr.l d0
clr.l d1
lea.l IText8(pc),a1
move.l IntuitionBase(pc),a6
jsr _LVOPrintIText(a6)
move.l ($4).L,a6
move.l #5*80,d0
move.l (a7)+,a1
jsr _LVOFreeMem(a6) ; Free buffer
move.l window2(pc),a0
bsr waitforclose
move.l IntuitionBase(pc),a6
move.l window2(pc),a0
jsr _LVOCloseWindow(a6)
clr.l d0 ; No WATCH Gadget
rts
;==============
;= Makestring =
;==============
makestring:
move.l ($4).L,a6
lea.l number(pc),a1
bsr.s convert
lea.l number(pc),a1
move.l buffer(pc),a0
bsr.s stringadd
rts
;========================
;= Copy string a0 -> a1 =
;========================
stringcopy:
1$ move.b (a0)+,(a1)+
bne.s 1$
rts
;==============================
;= Add string a1 to string a0 =
;==============================
stringadd:
move.l a2,-(a7)
1$ cmp.b #0,(a0)+ ; Find end of string a0
bne.s 1$
subq #1,a0
move.l a0,a2
move.l a1,a0
move.l a2,a1
bsr.s stringcopy ; Paste a1 to a0
move.l (a7)+,a2
rts
;==========================================
;= Convert value in a0 to buffer a1 (Hex) =
;==========================================
convert:
movem.l d2-d3/a2,-(a7)
lea.l convtable(pc),a2
move.l a0,d1
moveq #7,d3
1$ move.l d1,d2
and.l #$f,d2
move.l d2,d0
move.b 0(a2,d0),-(a7)
lsr.l #4,d1
dbra d3,1$
moveq #7,d3
2$ move.b (a7)+,(a1)+
dbra d3,2$
movem.l (a7)+,d2-d3/a2
rts
;=========================================
;= Calculates lenght of string in buffer =
;= Returns lenght in d0 =
;=========================================
length:
clr.l d0
move.l a5,-(a7)
move.l buffer,a5
1$ addq #1,d0
cmp.b #0,(a5)+
bne.s 1$
subq #1,d0
move.l (a7)+,a5
rts
;=======================================
;= Waits for closegadget to be pressed =
;=======================================
waitforclose:
move.l ($4).L,a6
move.l a5,-(a7)
move.l a0,a5
1$ move.l a5,a0
move.l wd_UserPort(a0),a0
move.l a0,-(a7)
moveq #0,d1
move.b mp_SigBit(a0),d1
moveq #1,d0
asl.l d1,d0
jsr _LVOWait(a6) ; Wait for an event
move.l (a7)+,a0 ; Get UserPort
jsr _LVOGetMsg(a6) ; Get Message from IDCMP Port
move.l d0,a1
move.l im_Class(a1),d4
jsr _LVOReplyMsg(a6) ; Reply the message
cmp.l #CLOSEWINDOW,d4
bne.s 1$
move.l (a7)+,a5
rts
;========================================
;= Prints current virusstatus in window =
;========================================
printstatus:
move.l window(pc),a0
move.l wd_RPort(a0),a1
move.l a1,rp ; Store RastPort
moveq #0,d1
move.b signal(pc),d1
beq.s 1$ ; No extra message needed (=Clean)
cmp.b #2,d1
beq.s 1$ ; The same...
move.l #message,Mt3 ; System has been modified!
move.l #message,Mt4
bra 12$
1$ move.l rp(pc),a0 ; Clear message box
clr. d0
clr.l d1
lea.l MyTekst3a(pc),a1
move.l IntuitionBase(pc),a6
jsr _LVOPrintIText(a6)
move.l #L9,Mt3 ; Clear previous(?) message!
move.l #L9,Mt4
12$ move.l rp(pc),a0
clr. d0
clr.l d1
move.l #MyTekst3,a1
move.l IntuitionBase(pc),a6
jsr _LVOPrintIText(a6)
move.b signal,d1
cmp.b #0,d1
bne.s 2$
lea.l L0(pc),a0
bra.s 10$
2$ cmp.b #1,d1
bne.s 3$
lea.l L1(pc),a0
bra.s 10$
3$ cmp.b #2,d1
bne.s 4$
lea.l L2(pc),a0
bra.s 10$
4$ cmp.b #3,d1
bne.s 5$
lea.l L3(pc),a0
bra.s 10$
5$ cmp.b #4,d1
bne.s 6$
lea.l L4(pc),a0
bra.s 10$
6$ cmp.b #5,d1
bne.s 7$
lea.l L5(pc),a0
bra.s 10$
7$ cmp.b #6,d1
bne.s 8$
lea.l L6(pc),a0
bra.s 10$
8$ cmp.b #7,d1
bne.s 9$
lea.l L7(pc),a0
bra.s 10$
9$ cmp.b #8,d1
bne.s 11$
lea.l L8(pc),a0
10$ move.l a0,Mt1
move.l a0,Mt2
move.l rp,a0
lea.l MyTekst(pc),a1
clr.l d0
clr.l d1
move.l IntuitionBase(pc),a6
jsr _LVOPrintIText(a6)
11$ rts
;======================================
;= Prints buffer in ascii on a window =
;======================================
printbuffer:
move.l buffer(pc),a3
move.l a3,a4
move.l #1023,d1
clr.l d0
cloop move.b (a3)+,d0
cmp.b #31,d0
bls.s outrange
cmp.b #127,d0
bhs.s outrange
move.b d0,(a4)+
dbra d1,cloop
bra.s printit
outrange:
move.b #'.',(a4)+
dbra d1,cloop
printit:
move.l window2(pc),a0
move.l wd_RPort(a0),rp2
moveq #0,d3
move.l buffer(pc),a3
ploop move.l d3,d1
mulu #8,d1
add.l #20,d1
move.w d1,y1
subq #1,d1
move.w d1,y2
lea.l dummy(pc),a2
move.l d3,d1
mulu #64,d1
move.l a3,a0
add.l d1,a0
moveq #63,d0
1$ move.b (a0)+,(a2)+ ; copy string to dummy
dbra d0,1$
move.b #0,(a2) ; end string with 0
clr.l d0
clr.l d1
move.l rp2(pc),a0
lea.l IText14(pc),a1
move.l IntuitionBase(pc),a6
jsr _LVOPrintIText(a6)
addq #1,d3
cmp.l #15,d3
bls.s ploop
rts
;============================
;= Read bootblock in buffer =
;============================
readbootblock:
move.w #READ,commando
bsr.s bootio
rts
;=============================
;= Write buffer to bootblock =
;=============================
writebuffer:
move.w #WRITE,commando
bsr.s bootio
rts
;==========================================
;= Multi function boot read/write routine =
;= =
;= io_error contains error on exit =
;= =
;==========================================
bootio:
move.l ($4).L,a6
move.l DoIOVector(pc),a5 ; ?????????????????????????
sub.l a1,a1
jsr _LVOFindTask(a6)
move.l d0,readreply+$10
lea.l readreply(pc),a1
jsr _LVOAddPort(a6)
lea.l diskio(pc),a1
moveq #0,d0
move.b drive,d0
clr.l d1
lea.l devicename(pc),a0
jsr _LVOOpenDevice(a6)
tst.l d0
beq.s tskip
lea.l readreply(pc),a1
jsr _LVORemPort(a6)
bra trackerror
tskip lea.l diskio(pc),a1
move.l buffer,40(a1)
move.l #readreply,14(a1)
move.w #TD_CHANGESTATE,28(a1)
jsr (a5) ; Jump into Rom !!!!
move.l diskio+32,d6
beq.s tskip2
move.b #29,io_error
bra terror ; No disk!
tskip2 move.w commando,d5
cmp.w #READ,d5
bne.s 1$ ; Don't CMD_CLEAR for a write
lea.l diskio(pc),a1 ; We will read a bootblock
move.l buffer(pc),40(a1)
move.l #readreply,14(a1) ; so, force a reading
move.w #5,28(a1)
jsr (a5) ; CMD_Clear (Clear trackbuffer)
1$ lea.l diskio(pc),a1
move.l #readreply,14(a1)
move.w commando,28(a1)
move.l buffer(pc),40(a1)
move.l #1024,36(a1)
move.l #0,44(a1)
move.l ($4).L,a6
jsr (a5)
move.b diskio+31,io_error ; Error number
move.w commando,d5
cmp.w #WRITE,d5
bne.s 2$
lea.l diskio(pc),a1
move.l buffer(pc),40(a1)
move.l #readreply,14(a1)
move.w #4,28(a1) ; CMD_UPDATE
move.l ($4).L,a6
jsr (a5) ; Write all buffers out
move.b diskio+31,io_error ; Get error number
2$ tst.b io_error
beq.s tgood
terror lea.l errormessage(pc),a1
move.l window2(pc),a0
move.l #0,a2
move.l IntuitionBase(pc),a6
jsr _LVOSetWindowTitles(a6)
move.l ($4).L,a6
tgood lea.l diskio(pc),a1
move.w #9,28(a1) ; TD_MOTOR
move.l #0,36(a1)
jsr (a5)
lea.l readreply(pc),a1
jsr _LVORemPort(a6)
lea.l diskio(pc),a1
jsr _LVOCloseDevice(a6)
trackerror:
rts
;================================
;= The maincode of my Bootblock =
;================================
bootcode:
dc.b 'DOS',0
dc.l 0
root dc.l 880
main move.l ($4).L,a6
lea.l Dosname(pc),a1
jsr _LVOFindResident(a6)
move.l d0,a0
move.l 22(a0),a0
clr.l d0
rts
Dosname dc.b 'dos.library',0
bootendcode:
;=========================================================
;= Routine which calculates the checksum of my bootblock =
;=========================================================
even
sum clr.l d0
move.l buffer(pc),a0
move.l #255,d1
sumloop add.l (a0)+,d0
bcc.s sumcont
addq #1,d0
sumcont dbra d1,sumloop
moveq #-1,d1
sub.l d0,d1
move.l buffer,a2
move.l d1,4(a2)
rts
;=====================================
;= This routine will spawn a new cli =
;=====================================
newcli:
lea.l commandstring(pc),a0
bra cont
do_function_keys:
cmp.w #FUNC_F2,d0
bne 1$
lea.l script2(pc),a0
bra cont
1$ cmp.w #FUNC_F3,d0
bne 2$
lea.l script3(pc),a0
bra cont
2$ cmp.w #FUNC_F4,d0
bne 3$
lea.l script4(pc),a0
bra cont
3$ cmp.w #FUNC_F5,d0
bne 4$
lea.l script5(pc),a0
bra cont
4$ cmp.w #FUNC_F6,d0
bne 5$
lea.l script6(pc),a0
bra cont
5$ cmp.w #FUNC_F7,d0
bne 6$
lea.l script7(pc),a0
bra cont
6$ cmp.w #FUNC_F8,d0
bne 7$
lea.l script8(pc),a0
bra cont
7$ cmp.w #FUNC_F9,d0
bne 8$
lea.l script9(pc),a0
bra cont
8$ cmp.w #FUNC_F10,d0
bne ret
lea.l script10(pc),a0
cont move.l a0,d1
move.l pcb_Input,d2
move.l pcb_Output,d3
move.l DOSBase(pc),a6
jsr _LVOExecute(a6)
ret move.b #0,keyfound
clr.l d0
rts
;====================================
;= Help routine: shows credits+help =
;====================================
showhelp:
move.w #450,hsize
move.w #130,hsize+2 ; Adjust height
move.l #HelpTitle,title2
move.l IntuitionBase(pc),a6
lea.l NewWindowStructure2,a0
jsr _LVOOpenWindow(a6)
move.l d0,window2
move.l d0,a0
move.l wd_RPort(a0),a0
lea.l Text15(pc),a1
clr.l d0
clr.l d1
jsr _LVOPrintIText(a6)
move.l window2(pc),a0
bsr waitforclose
move.l IntuitionBase(pc),a6
move.l window2(pc),a0
jsr _LVOCloseWindow(a6)
clr.l d0
rts
;===========================
;= The preference routines =
;===========================
preferences
movem.l d0-d6/a0-a6,-(a7)
move.l IntuitionBase(pc),a6
lea.l NewWindowStructure3(pc),a0
jsr _LVOOpenWindow(a6)
move.l d0,window3
beq pout
move.l d0,a0
move.l wd_RPort(a0),a0
lea.l Text24(pc),a1
clr.l d0
clr.l d1
jsr _LVOPrintIText(a6)
move.b patchstatus,tempstatus
bsr reflect
plook move.l window3(pc),a0
move.l ($4).L,a6
move.l wd_UserPort(a0),a0
move.l a0,-(a7)
moveq #0,d1
move.b mp_SigBit(a0),d1
moveq #1,d0
asl.l d1,d0
jsr _LVOWait(a6) ; Wait for an event
move.l (a7)+,a0 ; Get UserPort
jsr _LVOGetMsg(a6) ; Get Message from IDCMP Port
move.l d0,a1
move.l im_Class(a1),d4
move.l im_Address(a1),d5
jsr _LVOReplyMsg(a6) ; Reply the message
cmp.l #CLOSEWINDOW,d4
beq.s p_cancel
cmp.l #GADGETUP,d4
bne plook
move.l d5,a1
move.w GadgetID(a1),d0
cmp.w #USE,d0
beq p_use
cmp.w #CANCEL,d0
beq p_cancel
cmp.w #SAVE,d0
beq p_save
cmp.w #NOCARE,d0
beq p_nocare
cmp.w #MOUSEACC,d0
beq p_mouse
cmp.w #FUNCTIONKEYS,d0
bne plook
p_functionkeys:
eor.b #FUNCTION_PATCH,tempstatus
bra plook
p_use:
move.b tempstatus,patchstatus
bra pexit
p_cancel
bra pexit
p_save
move.b tempstatus,patchstatus
bsr Saddam
bsr save_prefs
bra pexit
p_nocare
eor.b #NOCARE_PATCH,tempstatus
bra plook
p_mouse
eor.b #MOUSE_PATCH,tempstatus
bra plook
pexit move.l IntuitionBase(pc),a6
move.l window3(pc),a0
jsr _LVOCloseWindow(a6)
bsr reflect
btst.b #0,patchstatus(pc)
bne.s 1$
bsr nocare_off
bra.s 2$
1$ bsr nocare
2$ movem.l (a7)+,d0-d6/a0-a6
pout clr.l d0
rts
reflect:
clr.w d1
move.b patchstatus(pc),d0
move.b d0,d1
and.b #1,d1
lsl.w #7,d1
and.w #$ff7f,tog1
or.w d1,tog1
clr.w d1
move.b d0,d1
and.b #2,d1
lsl.w #6,d1
and.w #$ff7f,tog2
or.w d1,tog2
clr.w d1
move.b d0,d1
and.b #4,d1
lsl.w #5,d1
and.w #$ff7f,tog3
or.w d1,tog3
rts
;======================
;= The reboot routine =
;======================
reboot bsr yesno2 ; Want to reboot???
tst.l d0
bne.s 1$ ; noop
rts
1$ move.l ($4).L,a6
move.l #-1,$4
cmp.w #V36_EXEC,LIB_VERSION(a6)
blt.s old_exec
jmp TEMP_ColdReboot(a6) ;Let Exec do it...
;NOTE: Control flow never returns to here
old_exec:
lea.l GoAway(pc),a5 ;address of code to execute
jsr _LVOSupervisor(a6) ;trap to code at (a5)...
;NOTE: Control flow never returns to here
;-------------- MagicResetCode ---------DO NOT CHANGE-----------------------
CNOP 0,4 ;IMPORTANT! Longword align!
GoAway: lea.l (MAGIC_ROMEND).L,a0 ;(end of ROM)
sub.l MAGIC_SIZEOFFSET(a0),a0 ;(end of ROM)-(ROM size)=PC
move.l 4(a0),a0 ;Get Initial Program Counter
subq.l #2,a0 ;now points to second RESET
reset ;first RESET instruction
jmp (a0) ;CPU Prefetch executes this
;NOTE: the RESET and JMP instructions must share a longword!
;---------------------------------------DO NOT CHANGE-----------------------
;=======================
;= The Cleanup Routine =
;=======================
exit move.l $4,a6
move.b #DIE,status
bsr nocare_off ; Remove Nocare patch
move.l $4,a6
lea.l InputRequestBlock(pc),a0
move.w #IND_REMHANDLER,io_Command(a0)
move.l #HandlerStuff,io_Data(a0)
move.l a0,a1
jsr _LVODoIO(a6) ; Remove handler
lea.l InputRequestBlock(pc),a0
jsr _LVOCloseDevice(a6)
move.l InputDevPort,a1
jsr _LVORemPort(a6)
move.l InputDevPort,a1
move.l #mp_Size,d0
jsr _LVOFreeMem(a6)
find move.l DOSBase,a6 ; Give Check Task time to die
move.l #25,d1 ; as I have a pri of 2
jsr _LVODelay(a6)
move.l $4,a6
lea.l CHECK_NAME(pc),a1
jsr _LVOFindTask(a6)
tst.l d0
bne.s find ; Wait until Check Task is dead
move.l checktask(pc),a1
move.l #TC_SIZE,d1
jsr _LVOFreeMem(a6) ; Free Memory of check task
move.l ($4).L,a6
move.l GfxBase,a1
jsr _LVOCloseLibrary(a6)
nographics:
move.l IntuitionBase(pc),a1
jsr _LVOCloseLibrary(a6)
nointuition:
move.l DOSBase(pc),a1
jsr _LVOCloseLibrary(a6)
nodos jsr _LVODisable(a6) ; Disable interupts (avoid AllocMem's)
move.l DOSBase(pc),a6 ; Assume Dos hasn't moved (???)
move.l #mymain,d1
sub.l #4,d1
lsr.l #2,d1 ; make BPTR !!!!!!
jsr _LVOUnLoadSeg(a6) ; Unload this code
move.l $4,a6
move.l #0,a1
jsr _LVORemTask(a6) ; Kill myself
rts
;================
;= Data section =
;================
Section "Main",data
Title dc.b 'BigBrother V3.12 by EA van Breemen',10,13
dc.b 169,'1992 Orega Holland.',10,13,0
Title_Size equ *-Title
even
Active_Title:
dc.b 'BigBrother is already active.',10,13,0
Active_Size equ *-Active_Title
even
NewWindowStructure1:
dc.w 62,30
dc.w 330,130
dc.b 1,3
dc.l GADGETUP+CLOSEWINDOW+RAWKEY
dc.l WINDOWDRAG+WINDOWDEPTH+WINDOWCLOSE+ACTIVATE+NOCAREREFRESH
dc.l Gadget1
dc.l NULL
dc.l CopyrightName
dc.l NULL
dc.l NULL
dc.w 5,5
dc.w -1,-1
dc.w WBENCHSCREEN
NewWindowStructure2:
dc.w 0,0
hsize dc.w 550,160
dc.b 1,3
dc.l CLOSEWINDOW
dc.l ACTIVATE+NOCAREREFRESH+WINDOWCLOSE
dc.l NULL
dc.l NULL
title2 dc.l InitTitle
dc.l NULL
dc.l NULL
dc.w 5,5
dc.w -1,-1
dc.w WBENCHSCREEN
NewWindowStructure3:
dc.w 0,0
dc.w 400,150
dc.b 1,3
dc.l CLOSEWINDOW+GADGETUP
dc.l ACTIVATE+NOCAREREFRESH+WINDOWCLOSE
dc.l Gadget10
dc.l NULL
dc.l PrefsTitle
dc.l NULL
dc.l NULL
dc.w 5,5
dc.w -1,-1
dc.w WBENCHSCREEN
CopyrightName:
dc.b 'Big Brother V3.12',0
dc.b ' ',169,'1989/1990',0
cnop 0,2
InitTitle:
dc.b 'BootBlock:',0
even
ViewTitle:
dc.b 'Contents of ExecBase:',0
even
InstallTitle:
dc.b 'Installing BootBlock',0
even
HelpTitle:
dc.b 'Help',0
even
PrefsTitle:
dc.b 'Preferences',0
even
install_message:
dc.b 'Disk has been installed',0
even
install_fail:
dc.b 'Install has failed',0
even
disk_protected:
dc.b 'Disk is write-protected!',0
even
disk_changed:
dc.b 'Disk has been removed!',0
even
StandardBootBlock:
dc.b 'Standard BootBlock by Orega Holland.'
dc.b ' Copyright 1989,1990. Installed by Big Brother V3.12'
Standardend:
even
prefs_file:
dc.b 's:big_prefs',0
even
topaz80:
dc.l topazname
dc.w TOPAZ_EIGHTY
dc.b 0,0
topazname:
dc.b 'topaz.font',0
even
Gadget1:
dc.l Gadget2
dc.w 29,22
dc.w 80,15
dc.w GADGHIMAGE
dc.w RELVERIFY
dc.w BOOLGADGET
dc.l Border1
dc.l RenderBorder1
dc.l IText1
dc.l NULL
dc.l NULL
dc.w DRIVE
dc.l NULL
Border1:
dc.w 0,0
dc.b 2,0,RP_JAM2
dc.b 3
dc.l BorderVectors1
dc.l Border1a
Border1a:
dc.w 0,0
dc.b 1,0,RP_JAM2
dc.b 3
dc.l BorderVectors1a
dc.l NULL
RenderBorder1:
dc.w 0,0
dc.b 1,0,RP_JAM2
dc.b 3
dc.l BorderVectors1
dc.l RenderBorder1a
RenderBorder1a:
dc.w 0,0
dc.b 2,0,RP_JAM2
dc.b 3
dc.l BorderVectors1a
dc.l NULL
BorderVectors1:
dc.w 0,15
dc.w 0,0
dc.w 80,0
BorderVectors1a:
dc.w 80,0
dc.w 80,15
dc.w 0,15
;======== Custom Drawing =======================
Border2:
dc.w 30,96
dc.b 2,0,RP_JAM2
dc.b 3
dc.l BorderVectors2
dc.l Border3
Border3:
dc.w 30,96
dc.b 1,0,RP_JAM2
dc.b 3
dc.l BorderVectors2a
dc.l NULL
BorderVectors2: ; Tekstbox of mainwindow
dc.w 0,26
dc.w 0,0
dc.w 280,0
BorderVectors2a:
dc.w 280,0
dc.w 280,26
dc.w 0,26
MyTekst:
dc.b 1,0,RP_JAM2,0
dc.w 45,110
dc.l topaz80
Mt1 dc.l NULL
dc.l MyTekst2
MyTekst2:
dc.b 2,0,RP_JAM1,0
dc.w 44,109
dc.l topaz80
Mt2 dc.l NULL
dc.l NULL
MyTekst3:
dc.b 1,0,RP_JAM2,0
dc.w 45,100
dc.l topaz80
Mt3 dc.l NULL
dc.l MyTekst4
MyTekst4:
dc.b 2,0,RP_JAM1,0
dc.w 44,99
dc.l topaz80
Mt4 dc.l NULL
dc.l NULL
;=====================================================
;= IntuiText structures for clearing the message box =
;=====================================================
MyTekst3a:
dc.b 1,0,RP_JAM2,0
dc.w 45,100
dc.l topaz80
dc.l L10
dc.l MyTekst4a
MyTekst4a:
dc.b 1,0,RP_JAM2,0
dc.w 44,99
dc.l topaz80
dc.l L10
dc.l MyTekst3b
MyTekst3b:
dc.b 1,0,RP_JAM2,0
dc.w 45,110
dc.l topaz80
dc.l L10
dc.l MyTekst4b
MyTekst4b:
dc.b 1,0,RP_JAM2,0
dc.w 44,109
dc.l topaz80
dc.l L10
dc.l NULL
MyTekst5:
dc.b 1,0,RP_JAM2,0
dc.w 40,25
dc.l topaz80
Mt5 dc.l NULL
dc.l MyTekst6
MyTekst6:
dc.b 2,0,RP_JAM1,0
dc.w 39,24
dc.l topaz80
Mt6 dc.l NULL
dc.l NULL
;=====================================
IText1:
dc.b 1,0,RP_JAM2,0
dc.w 21,3
dc.l topaz80
dc.l DummyTekst
dc.l IText1a
IText1a:
dc.b 1,0,RP_JAM2,0
dc.w 22,4
dc.l topaz80
dc.l ITextText1
dc.l IText1b
IText1b:
dc.b 2,0,RP_JAM1,0
dc.w 21,3
dc.l topaz80
dc.l ITextText1
dc.l NULL
ITextText1:
dc.b 'DF0:',0
cnop 0,2
DummyTekst:
dc.b ' ',0
cnop 0,2
Gadget2:
dc.l Gadget3
dc.w 128,46
dc.w 80,15
dc.w GADGHIMAGE
dc.w RELVERIFY
dc.w BOOLGADGET
dc.l Border1
dc.l RenderBorder1
dc.l IText2
dc.l NULL
dc.l NULL
dc.w MEMORY
dc.l NULL
IText2:
dc.b 1,0,RP_JAM2,0
dc.w 15,4
dc.l topaz80
dc.l ITextText2
dc.l IText2b
IText2b:
dc.b 2,0,RP_JAM1,0
dc.w 14,3
dc.l topaz80
dc.l ITextText2
dc.l NULL
ITextText2:
dc.b 'Memory',0
cnop 0,2
Gadget3:
dc.l Gadget4
dc.w 229,22
dc.w 80,15
dc.w GADGHIMAGE
dc.w RELVERIFY
dc.w BOOLGADGET
dc.l Border1
dc.l RenderBorder1
dc.l IText3
dc.l NULL
dc.l NULL
dc.w INSTALL
dc.l NULL
IText3:
dc.b 1,0,RP_JAM2,0
dc.w 13,4
dc.l topaz80
dc.l ITextText3
dc.l IText3b
IText3b:
dc.b 2,0,RP_JAM1,0
dc.w 12,3
dc.l topaz80
dc.l ITextText3
dc.l NULL
ITextText3:
dc.b 'Install',0
cnop 0,2
Gadget4:
dc.l Gadget5
dc.w 29,46
dc.w 80,15
dc.w GADGHIMAGE
dc.w RELVERIFY
dc.w BOOLGADGET
dc.l Border1
dc.l RenderBorder1
dc.l IText4
dc.l NULL
dc.l NULL
dc.w WATCH
dc.l NULL
IText4:
dc.b 1,0,RP_JAM2,0
dc.w 22,4
dc.l topaz80
dc.l ITextText4
dc.l IText4b
IText4b:
dc.b 2,0,RP_JAM1,0
dc.w 21,3
dc.l topaz80
dc.l ITextText4
dc.l NULL
ITextText4:
dc.b 'Watch',0
cnop 0,2
Gadget5:
dc.l Gadget6
dc.w 229,46
dc.w 80,15
dc.w GADGHIMAGE
dc.w RELVERIFY
dc.w BOOLGADGET
dc.l Border1
dc.l RenderBorder1
dc.l IText5
dc.l NULL
dc.l NULL
dc.w CLEAR
dc.l NULL
IText5:
dc.b 1,0,RP_JAM2,0
dc.w 22,4
dc.l topaz80
dc.l ITextText5
dc.l IText5b
IText5b:
dc.b 2,0,RP_JAM1,0
dc.w 21,3
dc.l topaz80
dc.l ITextText5
dc.l NULL
ITextText5:
dc.b 'Clear',0
cnop 0,2
Gadget6:
dc.l Gadget7
dc.w 128,22
dc.w 80,15
dc.w GADGHIMAGE
dc.w RELVERIFY
dc.w BOOLGADGET
dc.l Border1
dc.l RenderBorder1
dc.l IText6
dc.l NULL
dc.l NULL
dc.w VIEW
dc.l NULL
IText6:
dc.b 1,0,RP_JAM2,0
dc.w 22,4
dc.l topaz80
dc.l ITextText6
dc.l IText6b
IText6b:
dc.b 2,0,RP_JAM1,0
dc.w 21,3
dc.l topaz80
dc.l ITextText6
dc.l NULL
ITextText6:
dc.b 'View',0
even
Gadget7:
dc.l Gadget8
dc.w 29,70
dc.w 80,15
dc.w GADGHIMAGE
dc.w RELVERIFY
dc.w BOOLGADGET
dc.l Border1
dc.l RenderBorder1
dc.l IText7
dc.l NULL
dc.l NULL
dc.w NEWSHELL
dc.l NULL
IText7:
dc.b 1,0,RP_JAM2,0
dc.w 10,4
dc.l topaz80
dc.l ITextText7
dc.l IText7b
IText7b:
dc.b 2,0,RP_JAM1,0
dc.w 9,3
dc.l topaz80
dc.l ITextText7
dc.l NULL
ITextText7:
dc.b 'NewShell',0
even
Gadget8:
dc.l Gadget9
dc.w 229,70
dc.w 80,15
dc.w GADGHIMAGE
dc.w RELVERIFY
dc.w BOOLGADGET
dc.l Border1
dc.l RenderBorder1
dc.l _IText8
dc.l NULL
dc.l NULL
dc.w PREFS
dc.l NULL
_IText8:
dc.b 1,0,RP_JAM2,0
dc.w 23,4
dc.l topaz80
dc.l _ITextText8
dc.l _IText8b
_IText8b:
dc.b 2,0,RP_JAM1,0
dc.w 22,3
dc.l topaz80
dc.l _ITextText8
dc.l NULL
_ITextText8:
dc.b 'Prefs',0
even
Gadget9:
dc.l NULL
dc.w 128,70
dc.w 80,15
dc.w GADGHIMAGE
dc.w RELVERIFY
dc.w BOOLGADGET
dc.l Border1
dc.l RenderBorder1
dc.l _IT9
dc.l NULL
dc.l NULL
dc.w REBOOT
dc.l NULL
_IT9:
dc.b 1,0,RP_JAM2,0
dc.w 15,4
dc.l topaz80
dc.l _ITT9
dc.l _IT9b
_IT9b:
dc.b 2,0,RP_JAM1,0
dc.w 14,3
dc.l topaz80
dc.l _ITT9
dc.l NULL
_ITT9:
dc.b 'ReBoot',0
even
;===========================
;= Gadgets for preferences =
;===========================
Gadget10:
dc.l Gadget11
dc.w 220,30
dc.w 15,9
tog1 dc.w GADGHCOMP+SELECTED
dc.w RELVERIFY+TOGGLESELECT
dc.w BOOLGADGET
dc.l RenderBorder4
dc.l NULL
dc.l NULL
dc.l NULL
dc.l NULL
dc.w NOCARE
dc.l NULL
even
Gadget11:
dc.l Gadget12
dc.w 220,50
dc.w 15,9
tog2 dc.w GADGHCOMP+SELECTED
dc.w RELVERIFY+TOGGLESELECT
dc.w BOOLGADGET
dc.l RenderBorder4
dc.l NULL
dc.l NULL
dc.l NULL
dc.l NULL
dc.w MOUSEACC
dc.l NULL
even
Gadget12:
dc.l Gadget13
dc.w 220,70
dc.w 15,9
tog3 dc.w GADGHCOMP+SELECTED
dc.w RELVERIFY+TOGGLESELECT
dc.w BOOLGADGET
dc.l RenderBorder4
dc.l NULL
dc.l NULL
dc.l NULL
dc.l NULL
dc.w FUNCTIONKEYS
dc.l NULL
Gadget13:
dc.l Gadget14
dc.w 30,120
dc.w 80,15
dc.w GADGHIMAGE
dc.w RELVERIFY
dc.w BOOLGADGET
dc.l Border1
dc.l RenderBorder1
dc.l PText13
dc.l NULL
dc.l NULL
dc.w CANCEL
dc.l NULL
PText13:
dc.b 1,0,RP_JAM2,0
dc.w 15,4
dc.l topaz80
dc.l PTextText13
dc.l PText13b
PText13b:
dc.b 2,0,RP_JAM1,0
dc.w 14,3
dc.l topaz80
dc.l PTextText13
dc.l NULL
PTextText13:
dc.b 'Cancel',0
even
Gadget14:
dc.l Gadget15
dc.w 130,120
dc.w 80,15
dc.w GADGHIMAGE
dc.w RELVERIFY
dc.w BOOLGADGET
dc.l Border1
dc.l RenderBorder1
dc.l PText14
dc.l NULL
dc.l NULL
dc.w USE
dc.l NULL
PText14:
dc.b 1,0,RP_JAM2,0
dc.w 26,4
dc.l topaz80
dc.l PTextText14
dc.l PText14b
PText14b:
dc.b 2,0,RP_JAM1,0
dc.w 25,3
dc.l topaz80
dc.l PTextText14
dc.l NULL
PTextText14:
dc.b 'Use',0
even
Gadget15:
dc.l NULL
dc.w 230,120
dc.w 80,15
dc.w GADGHIMAGE
dc.w RELVERIFY
dc.w BOOLGADGET
dc.l Border1
dc.l RenderBorder1
dc.l PText15
dc.l NULL
dc.l NULL
dc.w SAVE
dc.l NULL
PText15:
dc.b 1,0,RP_JAM2,0
dc.w 22,4
dc.l topaz80
dc.l PTextText15
dc.l PText15b
PText15b:
dc.b 2,0,RP_JAM1,0
dc.w 21,3
dc.l topaz80
dc.l PTextText15
dc.l NULL
PTextText15:
dc.b 'Save',0
even
;======== Tekst structures for viewmemory ============
IText8:
dc.b 1,0,RP_JAM2,0
dc.w 11,26
dc.l topaz80
MTE8 dc.l NULL
dc.l IText8b
IText8b:
dc.b 2,0,RP_JAM1,0
dc.w 10,25
dc.l topaz80
MTE8b dc.l NULL
dc.l IText9
IText9:
dc.b 1,0,RP_JAM2,0
dc.w 11,36
dc.l topaz80
MTE9 dc.l NULL
dc.l IText9b
IText9b:
dc.b 2,0,RP_JAM1,0
dc.w 10,35
dc.l topaz80
MTE9b dc.l NULL
dc.l IText10
IText10:
dc.b 1,0,RP_JAM2,0
dc.w 11,46
dc.l topaz80
MTE10 dc.l NULL
dc.l IText10b
IText10b:
dc.b 2,0,RP_JAM1,0
dc.w 10,45
dc.l topaz80
MTE10b dc.l NULL
dc.l IText11
IText11:
dc.b 1,0,RP_JAM2,0
dc.w 11,56
dc.l topaz80
MTE11 dc.l NULL
dc.l IText11b
IText11b:
dc.b 2,0,RP_JAM1,0
dc.w 10,55
dc.l topaz80
MTE11b dc.l NULL
dc.l IText12
IText12:
dc.b 1,0,RP_JAM2,0
dc.w 11,66
dc.l topaz80
MTE12 dc.l NULL
dc.l IText12b
IText12b:
dc.b 2,0,RP_JAM1,0
dc.w 10,65
dc.l topaz80
MTE12b dc.l NULL
dc.l IText13
IText13:
dc.b 1,0,RP_JAM2,0
dc.w 11,81
dc.l topaz80
MTE13 dc.l NULL
dc.l IText13b
IText13b:
dc.b 2,0,RP_JAM1,0
dc.w 10,80
dc.l topaz80
MTE13b dc.l NULL
dc.l NULL
IText14:
dc.b 1,0,RP_JAM2,0
dc.w 10
y1 dc.w 0
dc.l topaz80
MTE14 dc.l dummy
dc.l IText14b
IText14b:
dc.b 2,0,RP_JAM1,0
dc.w 9
y2 dc.w 0
dc.l topaz80
MTE14b dc.l dummy
dc.l NULL
;== Help strings =====================================
Text15:
dc.b 1,0,RP_JAM2,0
dc.w 11,21
dc.l topaz80
dc.l T15
dc.l Text15b
Text15b:
dc.b 2,0,RP_JAM1,0
dc.w 10,20
dc.l topaz80
dc.l T15
dc.l Text16
T15 dc.b 'This program is programmed by EA van Breemen',0
even
Text16:
dc.b 1,0,RP_JAM2,0
dc.w 11,31
dc.l topaz80
dc.l T16
dc.l Text16b
Text16b:
dc.b 2,0,RP_JAM1,0
dc.w 10,30
dc.l topaz80
dc.l T16
dc.l Text17
T16 dc.b 'Copyright by Orega Holland',0
even
Text17:
dc.b 1,0,RP_JAM2,0
dc.w 11,41
dc.l topaz80
dc.l T17
dc.l Text17b
Text17b:
dc.b 2,0,RP_JAM1,0
dc.w 10,40
dc.l topaz80
dc.l T17
dc.l Text18
T17 dc.b 169,'1989-1992. Any commercially based reproducing',0
even
Text18:
dc.b 1,0,RP_JAM2,0
dc.w 11,51
dc.l topaz80
dc.l T18
dc.l Text18b
Text18b:
dc.b 2,0,RP_JAM1,0
dc.w 10,50
dc.l topaz80
dc.l T18
dc.l Text19
T18 dc.b 'by any means of this shareware product is illegal.',0
even
Text19:
dc.b 1,0,RP_JAM2,0
dc.w 11,61
dc.l topaz80
dc.l T19
dc.l Text19b
Text19b:
dc.b 2,0,RP_JAM1,0
dc.w 10,60
dc.l topaz80
dc.l T19
dc.l Text20
T19 dc.b 'If you find this program usefull please send $10',0
even
Text20:
dc.b 1,0,RP_JAM2,0
dc.w 11,71
dc.l topaz80
dc.l T20
dc.l Text20b
Text20b:
dc.b 2,0,RP_JAM1,0
dc.w 10,70
dc.l topaz80
dc.l T20
dc.l Text21
T20 dc.b 'to: EA van Breemen, Berliozplein 15, 2651 VG',0
even
Text21:
dc.b 1,0,RP_JAM2,0
dc.w 11,81
dc.l topaz80
dc.l T21
dc.l Text21b
Text21b:
dc.b 2,0,RP_JAM1,0
dc.w 10,80
dc.l topaz80
dc.l T21
dc.l Text22
T21 dc.b 'Berkel en Rodenrijs, Holland.',0
even
Text22:
dc.b 1,0,RP_JAM2,0
dc.w 11,101
dc.l topaz80
dc.l T22
dc.l Text22b
Text22b:
dc.b 2,0,RP_JAM1,0
dc.w 10,100
dc.l topaz80
dc.l T22
dc.l Text23
T22 dc.b 'Help: Ctrl-F1 ..... NewShell',0
even
Text23:
dc.b 1,0,RP_JAM2,0
dc.w 11,111
dc.l topaz80
dc.l T23
dc.l Text23b
Text23b:
dc.b 2,0,RP_JAM1,0
dc.w 10,110
dc.l topaz80
dc.l T23
dc.l NULL
T23 dc.b ' Ctrl-HELP ..... BigBrother',0
even
Text24:
dc.b 1,0,RP_JAM2,0
dc.w 31,31
dc.l topaz80
dc.l T24
dc.l Text24b
Text24b:
dc.b 2,0,RP_JAM1,0
dc.w 30,30
dc.l topaz80
dc.l T24
dc.l Text25
T24 dc.b 'NoCare patch installed:',0
even
Text25:
dc.b 1,0,RP_JAM2,0
dc.w 31,51
dc.l topaz80
dc.l T25
dc.l Text25b
Text25b:
dc.b 2,0,RP_JAM1,0
dc.w 30,50
dc.l topaz80
dc.l T25
dc.l Text26
T25 dc.b 'Mouse accelerator:',0
even
Text26:
dc.b 1,0,RP_JAM2,0
dc.w 31,71
dc.l topaz80
dc.l T26
dc.l Text26b
Text26b:
dc.b 2,0,RP_JAM1,0
dc.w 30,70
dc.l topaz80
dc.l T26
dc.l NULL
T26 dc.b 'Function keys enabled:',0
even
RenderBorder4:
dc.w -1,-1
dc.b 1,0,RP_JAM2
dc.b 3
dc.l BorderVectors4
dc.l RenderBorder4a
RenderBorder4a:
dc.w -1,-1
dc.b 2,0,RP_JAM2
dc.b 3
dc.l BorderVectors4a
dc.l NULL
BorderVectors4:
dc.w 0,10
dc.w 0,0
dc.w 17,0
BorderVectors4a:
dc.w 17,0
dc.w 17,10
dc.w 0,10
;=====================================================
expert dc.b 0,1,2,2,3,4,5,6,3,4,7
dc.b 7,3,4,7,7,8,8,0,1,8,8
dc.b 5,5,8,8,7,7,8,8,7,7
even
convtable dc.b '0123456789abcdef',0
even
message dc.b 'This system has been modified.',0
L0 dc.b 'Memory is clean.',0
L1 dc.b 'Sca virus.',0
L2 dc.b 'Unknown virus or not mounted rad.',0
L3 dc.b 'Non reset virus.',0
L4 dc.b 'Saddam like virus.',0
L5 dc.b 'Dasa virus.',0
L6 dc.b 'Dasa like virus.',0
L7 dc.b 'ByteBandit or Lamer virus.',0
L8 dc.b 'Unknown system configuration???',0
L9 dc.b 'System has not been modified. ',0
L10 dc.b ' ',0
even
TaskName dc.b 'RAD',0
even
devicename dc.b 'trackdisk.device',0
even
MyPortName dc.b 'BigBrother Port',0
even
errormessage dc.b 'BootBlock Read/Write Error.',0
even
found_rad dc.b 'RadTask has been found.',0
even
no_found_rad dc.b 'RadTask has not been found.',0
even
Alertstring dc.w 170
dc.b 15
dc.b '! ! ! ! ! W A R N I N G ! ! ! ! ! ',0
dc.b 1
dc.w 176
dc.b 27
dc.b 'Are you sure to clear the memory?',0
dc.b 1
dc.w 10
dc.b 39
dc.b 'Press <LEFT MOUSE BUTTON> for OK ---- Press <RIGHT MOUSE BUTTON> for CANCEL',0
dc.b 0
even
Alertstring2 dc.w 170
dc.b 15
dc.b '! ! ! ! ! W A R N I N G ! ! ! ! ! ',0
dc.b 1
dc.w 176
dc.b 27
dc.b 'Are you sure you want to Reboot? ',0
dc.b 1
dc.w 10
dc.b 39
dc.b 'Press <LEFT MOUSE BUTTON> for OK ---- Press <RIGHT MOUSE BUTTON> for CANCEL',0
dc.b 0
even
Alertstring3 dc.w 170
dc.b 15
dc.b '! ! ! ! ! W A R N I N G ! ! ! ! ! ',0
dc.b 1
dc.w 176
dc.b 27
dc.b 'Are you sure you want to quit ? ',0
dc.b 1
dc.w 10
dc.b 39
dc.b 'Press <LEFT MOUSE BUTTON> for OK ---- Press <RIGHT MOUSE BUTTON> for CANCEL',0
dc.b 0
even
;================
;= Library data =
;================
DosName dc.b 'dos.library',0
cnop 0,2
IntuitionName dc.b 'intuition.library',0
cnop 0,2
GraphicsName dc.b 'graphics.library',0
cnop 0,2
coldcapture dc.b 'ColdCapture - Offset 42 :$',0
coolcapture dc.b 'CoolCapture - Offset 46 :$',0
kickmemptr dc.b 'KickMemPtr - Offset 546 :$',0
kicktagptr dc.b 'KickTagPtr - Offset 550 :$',0
doio_vector dc.b 'DoIO Vector - Offset -454 :$',0
number dc.b '00000000',0
even
BIG_NAME dc.b 'BigBrother Process',0
CHECK_NAME dc.b 'Check Task',0
even
NIL_NAME dc.b 'NIL:',0
even
acc dc.w 3
script2 dc.b 'Execute s:F2',0
script3 dc.b 'Execute s:F3',0
script4 dc.b 'Execute s:F4',0
script5 dc.b 'Execute s:F5',0
script6 dc.b 'Execute s:F6',0
script7 dc.b 'Execute s:F7',0
script8 dc.b 'Execute s:F8',0
script9 dc.b 'Execute s:F9',0
script10 dc.b 'Execute s:F10',0
;=====================
;= Input Device data =
;=====================
InputDeviceName dc.b 'input.device',0
even
df0 dc.l 'DF0:'
df1 dc.l 'DF1:'
df2 dc.l 'DF2:'
df3 dc.l 'DF3:'
dc.b ' DoIO vector:'
even
DoIOVector dc.l $fc06dc ; DoIO Vector for V1.2
TrackDiskIO dc.l $0
patchstatus dc.b 1
even
commandstring dc.b 'newshell "con:0/0/639/100/Big Brother V3.12"',0
cnop 0,2
even
section "Main",bss
DOSBase ds.l 1
GfxBase ds.l 1
IntuitionBase ds.l 1
window ds.l 1
window2 ds.l 1
window3 ds.l 1
oldopenwindow ds.l 1
rp ds.l 1
rp2 ds.l 1
buffer ds.l 1
keyfound ds.w 1
commando ds.w 1
Mode ds.b 1
signal ds.b 1
drive ds.b 1
io_error ds.b 1
even
diskio ds.l 20
readreply ds.l 8
memorymask ds.l 1
filehandle ds.l 1
lock ds.l 1
virusmask ds.l 1
keymask ds.l 1
bigtask ds.l 1
InputDevPort ds.l 1
InputRequestBlock ds.b $30
even
HandlerStuff ds.b $16
even
dummy ds.b 70
even
userport ds.l 1
myseg ds.l 1
pcb_Input ds.l 1
pcb_Output ds.l 1
tempstatus ds.b 1
status ds.b 1
even
stack ds.l 256
checktask ds.l 1
;=========================
;= The end of the source =
;=========================
end